import { Component, OnInit, Input } from '@angular/core';

@Component({
  selector: 'app-product',
  templateUrl: './product.component.html',
  styleUrls: ['./product.component.scss']
})
export class ProductComponent implements OnInit {
  @Input() product:any;
  width:any;
  constructor() { }

  ngOnInit() {
    this.width=this.product.promotionStock / this.product.dailyStock * 100+'%';
  }

}
